<?php
class base{
    protected $db  = null;
    protected $_uc = false;
    function __construct($p=null){
        $this->db=$p?$p:$GLOBALS['db'];
    }
    
    function __destruct(){
        unset($this);
    }
    
    function table($name){
        return $this->_uc?U_PREF.$name:D_PREF.$name;
    }
}
?>